﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OA协同办公系统</title>
 <link href="css/table.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
	function addtext(){
		var text = $("#text").val();
		if($.trim(text)==''||$.trim(text)==null){
			$("#errorinfo").html("<img src=\"image/cuo.gif\" width=\"16\" height=\"16\" />&nbsp;<font color=\"#FF0000\">不能为空！</font>");
			return;
		}else{
			$("#errorinfo").html("");
		}
		if(text.length>50){
			alert("不能超过50字符");
			return;
		}
		var param={"oworklan.content":text}
		$.post("savetext.action",param,function(data){
			if(data=='success'){
				window.opener.location.reload();
				window.close();
			}else{
				alert("添加失败！");
			}
		});
	}
</script>
</head>
<body>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
  <tbody>
  <tr>
    <td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
    <td style="background: url('image/wsoa_window_002.gif');"><table border="0" cellpadding="0" cellspacing="0">
      <tbody><tr>
        <td align="center" style="background: url('image/wsoa_window_002.gif');" width="10"><img src="image/center_19.gif"></td>
        <td align="center" style="background: url('image/wsoa_window_002.gif');"></td>
        <td>个人办公 &gt; 我的办公桌 &gt; 办公语 &gt; <a href="addText.action">添加</a></td>
        </tr>
    </tbody>
    </table></td>
    <td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
  </tr>
  <tr>
    <td style="background: url('image/wsoa_window_010.gif');"  width="1">&nbsp;</td>
    <td>
<table style="margin: 10px 10px 10px 10px "  align="center"><tr><td>添加办公语：</td></tr><tr><td>
<textarea id="text" name="text" style=" width:250px; height:150px; overflow:hidden"></textarea>
</td></tr>
<tr><td><input type="submit" class="button_02" value="添加" onclick="addtext()" />&nbsp;&nbsp;
<span id="errorinfo"></span>
</td></tr>
</table>
<td style="background: url('image/wsoa_window_006.gif');"  width="1">&nbsp;</td></tr>
  <tr>
    <td height="1" width="1"><img src="image/wsoa_window_009.gif" height="16" width="14"></td>
    <td style="background: url('image/wsoa_window_008.gif');" height="1"></td>
    <td height="1" width="1"><img src="image/wsoa_window_007.gif" height="16" width="12"></td>
  </tr>
</tbody>
</table>
</body>
</html>